#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>

int main1()
{
	int c, nl;
	nl = 0;
	while ((c = getchar()) != EOF)
		if (c == '\n') ++nl;
	printf("%d\n", nl);
	return 0;
}


int main2()
{
	int a[4][5] = { 0 };
	int (*p)[5];
	p = a;
	printf("%p\n", p);
	printf("%p\n", p + 1);
	printf("%p\n", *(p + 3));
	printf("%p\n", *(p + 1)+3);
	printf("%d\n", *(*p + 2));
	return 0;
}

int main3()
{
	int a[4] = { 0 };
	int* p = a;
	printf("%p\n", p);
	printf("%p\n", p + 1);
	printf("%d\n", *(p + 3));

	return 0;
}


int f(int* p)
{
	return *p;
}

int main4()
{
	int i = 0;
	printf("%d", f(&i));
	return 0;
}

int fun(char* s)
{
	char* t = s;
	while (*t)
	{
		t++;
	}
	return (t - s);
}

int main5()
{
	char c[] = "asdf";
	char* p = "asdf";
	printf("%d\n", fun(p));
	printf("%d\n", sizeof(p));	
	printf("%d\n", fun(c));
	printf("%d\n", sizeof(c));
	return 0;
}

int main()
{
	int a[4][10], * p, * q[4];
	p = a;
	q[0] = a[0];
	p = a[1];
	q[2] = &a[2][0];
	return 0;
}